86919: Message in IOU is not scrolled to when navigating via link, 'submitted' not shown#96428
86919: Message in IOU is not scrolled to when navigating via link, 'submitted' not shown#96428abbasifaizan70 wants to merge 6 commits into
Conversation
…ubmitted' not shown
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
Do publish the PR if code changes are done |
|
@abdulrahuman5196 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@abdulrahuman5196 Sorry, my bad. I just forgot to make it ready for review. Thanks for giving remainder. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a8a51d0c1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const isInThisReport = sortedAllReportActions?.some((action) => action.reportActionID === reportActionID) ?? false; | ||
| return isInThisReport ? reportActionID : undefined; |
There was a problem hiding this comment.
Don't drop anchors for uncached linked actions
When navigating to a valid linked message that is not currently in Onyx for this report (for example a cached chat with only the latest page loaded, then opening an older message link), this returns undefined and getContinuousChain renders the newest window instead of the previous empty/loading state. The list can mount before OpenReport hydrates the target action, and because linked-message positioning is calculated as an initial scroll, it will not scroll to the target after it arrives. Please only drop the anchor when we know the action belongs to the merged transaction thread, not merely when it is absent from the current cache.
Useful? React with 👍 / 👎.
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Good for product.
Explanation of Change
This fixes the copied message link for one-transaction expenses. Previously the link pointed at the transaction thread, so opening it hid the parent "Submitted" system message and failed to scroll to the linked message. The copy-link action now uses the displayed (parent expense) report ID; LinkedActionNotFoundGuard also looks up the linked action in the transaction thread so a valid link no longer renders "comment not found"; and usePaginatedReportActions falls back to the newest window instead of an empty list when the linked action belongs to the merged-in thread. Result: the link opens the combined expense view with "Submitted" visible and scrolls to the linked message on first navigation.
Fixed Issues
$ #86919
PROPOSAL: #86919 (comment)
Tests
Steps:
Offline tests
Same as tests.
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2026-07-18.at.3.37.35.AM.mov
Android: mWeb Chrome
Screen.Recording.2026-07-18.at.3.42.06.AM.mp4
iOS: Native
Screen.Recording.2026-07-18.at.2.58.01.AM.mov
Screen.Recording.2026-07-18.at.2.59.07.AM.mov
iOS: mWeb Safari
Screen.Recording.2026-07-18.at.3.02.19.AM.mov
MacOS: Chrome / Safari
Screen.Recording.2026-07-18.at.2.52.35.AM.mov